<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<%@ include file="../../header.jsp" %>
</head>
<body>

 <form id="formUpd" class="layui-form">
 


 <div class="layui-form-item">
   
     <label class="layui-form-label"></label>
        <div class="layui-input-block"> 
        </div>
 </div>
 <div class="layui-form-item">
   
     <label class="layui-form-label">课程编号</label>
        <div class="layui-input-block"> 
        <input type= "text" id="courseId" readonly value='<%=request.getParameter("courseId") %>' class="layui-input" style="width: 150px;"></input>
        </div>
 </div>
        <input type= "hidden" id="studentId" readonly value='<%=request.getParameter("studentId") %>' class="layui-input" style="width: 150px;"></input>
 

 
<div class="layui-form-item">
   <label class ="layui-form-label">课程名称</label>
   <div class="layui-input-block">
   <input type="text" id="courseName" value='<%=request.getParameter("courseName")%>' readonly class="layui-input" style="width:150px">
   
   </div>
   
</div>
<div class="layui-form-item">
   <label class ="layui-form-label">本科成绩</label>
   <div class="layui-input-block">
   <input type="text" id="score"  value=<%=request.getParameter("score")%> class="layui-input" style="width:150px">
   
   </div>
  </div> 
   
  <div class="layui-form-item">
   <label class ="layui-form-label">学分绩点</label>
   <div class="layui-input-block">
   <input type="text" id="gradePoint" value= "<%=request.getParameter("gradePoint") %>"  class="layui-input" style="width:150px">
   </div>
   </div>
   
  <div class="layui-form-item">
   <label class ="layui-form-label">授课教师</label>
   <div class="layui-input-block">
   <input type="text" id="teacher" value= "<%=request.getParameter("teacherName") %>" readonly class="layui-input" style="width:150px">
   
   </div>

   </div>



  <div class="layui-form-itme">
   <div class="layui-input-block">
   <input type="javascript:;"  class="layui-btn" onclick="close()" value="关闭" style="width:80px" ></input>
   
    <button type="reset"  title="重置"  class="layui-btn">重置</button>
    
     <input name ="action" type="button"  value = "修改" onclick="update()" style="width:80px"  class="layui-btn"></input>
  
   </div>
   
   
</div>


 </form>

</body>

</body>

<script src="../../static/js/base.js"></script>
<script type="text/javascript">


refresh();

function refresh(){
	 $("#selectId").click();	
	}
function update(){
	var studentId = $("#studentId").val();
	var score = $("#score").val();
	var courseId = $("#courseId").val();
	var gradePoint =$("#gradePoint").val();

   
  
	
	
	
ajax("/StudentMangers/ScoreServlet",{action:"修改",studentId:studentId,score:score,courseId:courseId,gradePoint:gradePoint},"json",function(data){
	
	if(data=="1"){

		
		layer.msg("修改成功",close);
		
		
	}else{
		layer.msg("修改失败");
	}
	
});
}





function refresh(){
	 $("#selectId").click();	
	}

   
</script>
</html>